#!/bin/bash
# 启动Kafka集群
mkdir -p ./kafka-zookeeper/data
mkdir -p ./kafka-node-1/data
mkdir -p ./kafka-node-2/data
mkdir -p ./kafka-node-3/data

chmod -R 777 ./kafka-zookeeper/data
chmod -R 777 ./kafka-node-1/data
chmod -R 777 ./kafka-node-2/data
chmod -R 777 ./kafka-node-3/data
echo "Starting Kafka cluster..."
docker-compose up -d

# 等待服务初始化
echo "Waiting for services to initialize..."
sleep 5

# 显示运行状态
echo "Current cluster status:"
docker-compose ps
